<?php

class Form_LoginForm extends Form_Custom_General {

    public function init() {

        $lgn_email = $this->createElement('text', 'lgn_email')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Email address should not be blank.')))
                ->addValidator(new Zend_Validate_EmailAddress())
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->setAttribs(Array('class' => "inputbox", "placeholder" => "Email Address"));
        $lgn_email->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
        $this->addElement($lgn_email);
		
		 $lgn_signup = $this->createElement("checkbox", "lgn_signup")
                    //->setRequired(FALSE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please Check the Sign up for Newsletter / Discounts")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","placeholder"=>""));
                     $this->addElement($lgn_signup);
		
		$submit = $this->createElement("submit", "submit")
               // ->setLabel('submit')
				->setAttribs(Array("title" => "Save changes", "class"=>"click-btn"));
        $this->addElement($submit);
    }

}